<template>
	<view class="container">
		<cu-header bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content" class="page-name">设置</block>
		</cu-header>
		<view class="">
			<view>
				<cu-cell title="个人信息">
					<block slot="right">收货地址管理</block>
				</cu-cell>
				<cu-cell title="账户安全">
					<block slot="right"></block>
				</cu-cell>
				<cu-cell title="消息提醒">
					<block slot="right"></block>
				</cu-cell>
				<cu-cell title="通用设置">
					<block slot="right"></block>
				</cu-cell>
				<cu-cell title="支付设置">
					<block slot="right"></block>
				</cu-cell>
				<cu-cell title="隐私设置">
					<block slot="right"></block>
				</cu-cell>
			</view>
			<view class="margin-top-sm">
				<cu-cell title="关于我们">
					<block slot="right"></block>
				</cu-cell>
				<cu-cell title="意见反馈">
					<block slot="right"></block>
				</cu-cell>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex'
	import cuCell from '@/components/diy/content/cu-cell.vue';
	export default {
		computed: {
			...mapState(['hasLogin', 'forcedLogin', 'userinfo', 'isBack'])
		},
		components: {
			cuCell
		},
		data() {
			return {
				vipLevel: 321,
				uid: 0,
				basephoto: '../../static/logo.png'
			};
		},
		onLoad() {

		},
		onShow() {

		},
		onUnload() {
			this.setBack(false)
		},
		onPullDownRefresh: function() {
			var that = this;
			setTimeout(function() {

			}, 200);
		},
		onShareAppMessage: function(res) {
			if (res.from === 'button') {
				// 来自页面内分享按钮
				console.log(res.target);
			}
			let params = "token=" + this.userinfo.uid;
			return this.$util.getSharePage(params);
		},
		methods: {
			...mapMutations(['logout', 'login', 'loginsoure', 'setBack']),
			onClickUser: function() {
				if (this.hasLogin) {
					uni.navigateTo({
						url: './my_info'
					})
				} else {
					uni.navigateTo({
						url: '../login/login'
					})
				}
			},
			toPage(e) {
				var url = e.currentTarget.dataset.url;
				uni.navigateTo({
					url: url
				});
			}
		}
	};
</script>

<style>
	.cuIcon {
		font-size: 50upx;
	}

	.center {
		margin: auto auto;
	}

	.center-list {
		background-color: #ffffff;
		margin-top: 15upx;
		margin-bottom: 15upx;
		width: 100%;
		flex-direction: column;
	}

	.center-list-item {
		height: 90upx;
		width: 100%;
		box-sizing: border-box;
		flex-direction: row;
		padding: 0upx 20upx;
		position: relative;
		align-items: center;
	}

	.border-bottom {
		border-bottom-width: 1upx;
		border-color: #c8c7cc;
		border-bottom-style: solid;
	}

	.list-icon {
		width: 40upx;
		height: 40upx;
		line-height: 90upx;
		font-size: 34upx;
		color: #2f85fc;
		text-align: center;
		align-items: center;
		font-family: texticons;
		margin-right: 20upx;
		vertical-align: text-bottom;
	}

	.list-text {
		height: 90upx;
		line-height: 90upx;
		flex: 1;
		text-align: left;
		font-size: 30upx;
		font-family: FZLTKHK--GBK1-0;
		font-weight: 400;
		color: rgba(131, 131, 131, 1);
	}

	.navigat-arrow {
		height: 90upx;
		width: 40upx;
		line-height: 90upx;
		font-size: 34upx;
		color: #555;
		text-align: right;
		font-family: texticons;
		position: absolute;
		right: 40upx;
	}
</style>
